<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>订单列表</title>
		<style type="text/css">
<!--
.c1 {
	font-size: 13px;
	color: #FFFFFF;
}

.c2 {
	font-size: 13px;
	font-weight: bold;
	color: #FFFFFF;
}

.title {
	font-size: 15px;
	color: #1B3E6D;
	line-height: 18pt;
	font-weight: bold;
}
a.goon{
	background:url(../) no-repeat 0 -120px;
	width:101px;
	padding:0 0 0 11px;
	height:25px;
	line-height:25px;
	margin-top:9px;
	text-align:center;
	font-size:12px;
	color:#404040;
}
-->
</style>
		<link href="css/c1.css" rel="stylesheet" type="text/css">
		<link href="css/style.css" rel="stylesheet" type="text/css">
		<script type="text/javascript">
function gbcount(message,total,used,remain) {
 	var max;
	max = total.value;
	if (message.value.length > max) {
		message.value = message.value.substring(0,max);
		used.value = max;
		remain.value = 0;
		alert("留言不能超过 300 个字!");
	} else {
		used.value = message.value.length;
		remain.value = max - used.value;
	}
}
</script>
	</head>
	<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
		<jsp:include page="top.jsp" />

		<table width="1004" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td height="484" align="center">
					<table width="98%" height="528" border="0" align="center"
						cellpadding="0" cellspacing="0">
						<tr>
							<td width="192" height="528" valign="top">
								<jsp:include page="left.jsp" />
							</td>
							<td align="center" valign="top">
								<c:if test="${ empty session.orderlist }">
									<font color="#FF0000" size="13">${ request.msg }</font><br/>
									<a href="showproducts.action" style="font-size: 20Px;">马上选购</a>
								</c:if>
								<c:if test="${ !empty session.orderlist }">
									<table width="700" border="0" cellpadding="0" cellspacing="0">
										<tr background="image/page/mean_bg.jpg">
											<td height="40" background="image/page/mean_bg.jpg">
												&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<img src="image/page/arr.jpg" width="14" height="6">
												<span class="title">&nbsp;订单详细</span>
											</td>
										</tr>
										<tr>
											<td align="center" valign="top" width="100%">
												<table width="100%" border="0" cellpadding="0"
													cellspacing="0" style="color: #333">
													<tr>
														<td height="31">
															&nbsp;
														</td>
														<td>
														<table width="100%" border="0" align="center">
															<tr bgcolor="#FFFFFF" class="texthei" align="center">
																<td>产品编号</td>
																<td>产品图片</td>
																<td>产品名称</td>
																<td>产品型号</td>
																<td>产品数量</td>
																<td>产品单价</td>
																<td>删除产品</td>
															</tr>
															<c:forEach items="${ session.orderlist }" var="ol">
																<tr bgcolor="#FFFFFF" class="texthei" align="center">
																	<td>${ ol.products.barcode }</td>
																	<td>
																		<img alt="${ ol.products.PName }" src="image/product/${ ol.products.image }"
																			width="80" height="60"/>
																	</td>
																	<td>${ ol.products.PName }
																	</td>
																	<td>${ ol.products.model }
																	</td>
																	<td>${ ol.LNum }
																	</td>
																	<td>${ ol.LPrice }</td>
																	<td>
																		<a href="deleteProduct.action?pid=${ ol.products.PId }">删除</a>
																	</td>
																</tr>
															</c:forEach>
														</table>
														</td>
													</tr>
													<tr>
														<td height="31" valign="top" colspan="2">
															<form name="form1" method="post" action="saveProductOrder.action">
																<table width="100%" border="0" align="center" cellpadding="0"
																	cellspacing="0" class="c1">
																	<tr>
																		<td width="10%" align="right" valign="top"><font color="#000">备注：</font></td>
																		<td >
																			<font color="#333333"> &nbsp; <textarea
																				name="ps" cols="75" rows="3"
																				class="input1" id="ps"
																				onKeyDown="gbcount(this.form.ps,this.form.total,this.form.used,this.form.remain);"
																				onKeyUp="gbcount(this.form.ps, this.form.total, this.form.used, this.form.remain);"></textarea><br/>
																				最多字数： <input disabled="disabled" maxLength="4" id="total" size="3" value="100" class="input1"> 
																				已用字数： <input disabled="disabled" maxLength="4" id="used" size="3" value="0" class="input1"> 
																				剩余字数： <input disabled="disabled" maxLength="4" id="remain" size="3" value="100" class="input1">
																		</font>
</td>
																	</tr>
																	<tr class="texthei">
																		<td colspan="2" align="right" valign="top"
																			bgcolor="#FFFFFF">
																			<div align="right">
																				<img height="1" src="" width="680" /><br />
																				<a href='showproducts.action' 
																					style="background:url(image/page/go_back.jpg) no-repeat;padding-top : 7px;padding-left : 20px; height: 30px; width: 100px; text-align: center;">继续选购</a>
																				<input class="input1" type="image" src="image/page/go_order.jpg"/>
																			</div>
																		</td>
																	</tr>
																</table>
															</form>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</c:if>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
		<jsp:include page="bottom.jsp" />

	</body>
</html>
